Skip to content

fix(versions): fix duplicate entry for key 'c_p_versions_uniq_idx'#2451

Open
mejo- wants to merge 1 commit intomainfrom
fix/versions_duplicate_key_entry
Open

fix(versions): fix duplicate entry for key 'c_p_versions_uniq_idx'#2451
mejo- wants to merge 1 commit intomainfrom
fix/versions_duplicate_key_entry

Conversation

@mejo-
Copy link
Copy Markdown
Member

@mejo- mejo- commented Apr 28, 2026

A race condition in requests could lead to this error as two requests tried to create version entries for the same fileId + timestamp combination.

Fix the bug by catching these errors and handling them gracefully.

Fixes: #1886
Fixes: #2405

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

@mejo- mejo- self-assigned this Apr 28, 2026
@mejo- mejo- requested a review from max-nextcloud as a code owner April 28, 2026 14:54
@mejo- mejo- added the bug Something isn't working label Apr 28, 2026
@mejo- mejo- requested a review from silverkszlo as a code owner April 28, 2026 14:54
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 📝 Productivity team Apr 28, 2026
@mejo- mejo- moved this from 🧭 Planning evaluation (don't pick) to 👀 In review in 📝 Productivity team Apr 28, 2026
A race condition in requests could lead to this error as two requests
tried to create version entries for the same fileId + timestamp
combination.

Fix the bug by catching these errors and handling them gracefully.

Fixes: #1886
Fixes: #2405

Signed-off-by: Jonas <jonas@freesources.org>
@mejo- mejo- force-pushed the fix/versions_duplicate_key_entry branch from cf12b9c to f6621ec Compare April 28, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

Unique violation error in oc_collectives_p_versions during Desktop Client synchronization Duplicate entry '...' for key 'c_p_versions_uniq_idx'

1 participant